#pragma once
#include "stdafx.h"
#include "Element.h"
#include "StreamPage.h"
#include "BufferConstraint.h"
#include <boost/shared_ptr.hpp>
#include <map>
#include "AbstractBuffer.h"
class QueueBuffer : public AbstractBuffer
{
private:
	MemoryPosition freePositionHead;
	std::queue<MemoryPosition> elementQueue;
	int elementNumber; // how many elements are buffered

public:
	QueueBuffer(void);
	~QueueBuffer(void);
	void enqueue(Element& element);
	void dequeue(Element& element);
	void dequeue(void);
	void peek(Element& element);
	bool isFull(void);
	bool isEmpty(void);
};

